home *** CD-ROM | disk | FTP | other *** search
-
- class CLine;
- class CPoint;
-
- // Used when testing which side a Line is from another.
- enum SideDir { LeftSide, RightSide, Intersect };
-
- class CPoint
- {
- public:
- // Every Point has 2 implied Y coordinates. These are the same for every Point
- // so there's no need to store them. They don't change either when you translate
- // and rotate the points so there's no need to have them for transX and Y.
-
- // The point's real coordinates. These are from looking at it from overhead.
- WORD localX, localY;
- };
-
-
- // Does all the navigating of the tree, drawing the necessary Lines.
- BOOL bsp_TraverseAndDrawTree( CLine *pRootLine );
-
- // Just tells what side of the Line the player is on.
- SideDir bsp_PlayerSide( Player *pPlayer, CLine *pLine );
-
- // Rotates pointX and pointY around xOrigin and yOrigin.
- void RotatePoint( DWORD xOrigin, DWORD yOrigin, Angle rotateAngle, DWORD pointX, DWORD pointY, Fixed *pDestX, Fixed *pDestY );
-
- // Same as RotatePoint but expects the parameters passed to it in fixed-point.
- void RotatePointFixed( Fixed xOrigin, Fixed yOrigin, Angle rotateAngle, Fixed pointX, Fixed pointY, Fixed *pDestX, Fixed *pDestY );
-
- // Rotates pointX and pointY around xOrigin and yOrigin. Only stores the Y coordinate.
- void RotatePointYOnly( DWORD xOrigin, DWORD yOrigin, Angle rotateAngle, DWORD pointX, DWORD pointY, Fixed *pDestY );
-
- // Returns the angle from point 1 to point 2.
- Angle GetAngle( DWORD x1, DWORD y1, DWORD x2, DWORD y2 );
-
- // Tests to see if pLine doesn't intersect the view angles.
- SideDir bsp_PruneTree( CLine *pLine );
-
- // Used for debugging .. goes through the whole tree and finds the parent of
- // pChildLine.
- CLine *bsp_GetParentFromLine( CLine *pRootLine, CLine *pChildLine );
-
-
-
-